package net.lijingye.education.dao.impl;

import net.lijingye.education.dao.LessonDao;
import net.lijingye.education.entity.Lesson;
import net.lijingye.education.exception.DaoException;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * Created by LijingYe on 2016/4/4.
 */
@Repository
public class LessonDaoImpl extends BaseDaoImpl<Lesson> implements LessonDao {
    @Override
    public Lesson getById(Serializable id) throws DaoException {
        Lesson lesson = super.getById(id);
        if (null != lesson && 0 == lesson.getStatus()) {
            return null;
        }
        return lesson;
    }
}
